<div class="page-group">
    <div class="page page-current" id="page-index">
		
        	<header class="bar bar-nav">
				<h1 class="title">呼叫车主挪车</h1>
			</header>
			<div class="content native-scroll">
				<div class="card">
				    <div class="card-header">车主留言:</div>
				    <div class="card-content">
				      <div class="card-content-inner">{{pagedata.car_user.message}}</div>
				    </div>
			  	</div>
			  	<div class="content-block-title">恶意通知车主挪车的用户将被关入小黑屋哦</div>
		      	<div class="list-block">
			      <ul>
			      	<li ng-if="pagedata.setting.location==1">
			          <div class="item-content">
			            <div class="item-inner">
			              <div class="item-title label">当前位置：</div>
			              <div class="item-input">
			                <input type="text" ng-model="pagedata.item.address" readonly>
			              </div>
			            </div>
			          </div>
			        </li>
			        <li>
			          <div class="item-content">
			            <div class="item-inner">
			              <div class="item-title label">车牌号：</div>
			              <div class="item-input">
			                <input type="text" id="move-type" ng-model="pagedata.car_user.plate" readonly>
			              </div>
			            </div>
			          </div>
			        </li>
					<li>
				      	<div class="item-content">
				        	<div class="item-inner">
				        		<div class="item-title label" style="color:#333;">手机号码</div>
				          		<div class="item-input">
				            		<input type="tel" name="mobile" id="loginmobile" ng-model="pagedata.item.mobile" placeholder="请输入手机号码" value="">
				          		</div>
				        	</div>
				      	</div>
				    </li>
			        
					<li ng-if="pagedata.setting.verify==1">
				      	<div class="item-content">
				        	<div class="item-inner">
				        		<div class="item-title label" style="color:#333;">验证码</div>
				          		<div class="item-input">
				            		<input type="tel" name="code" id="logincode"  ng-model="pagedata.item.verifycode" placeholder="请输入验证码">
				          		</div>
				          		<div id="getVerifyCode" ng-click="pagedata.send_smscode(pagedata.item.mobile)" class="verifycode">发送验证码</div>
				        	</div>
				      	</div>
				    </li>
			      </ul>
			    </div>
			    <div class="content-block">
			      	<a href="javascript:;" class="weui_btn weui_btn_primary" ng-click="pagedata.item.notice_type=1;post(pagedata.item,'notice')">通知车主挪车</a>
			      	<a href="javascript:;" ng-if="pagedata.setting.call==1" ng-click="pagedata.item.notice_type=2;pagedata.call()" class="weui_btn weui_btn_default" id="callmover">电话联系车主</a>
			      	
			    </div>
			   
			    <!--广告区end-->
			    <div class="wlcopyright">
					{{pagedata.site.copyright}}
				</div>
			</div>
		
	</div>
</div>
<script>
if(scope.pagedata.setting.location==1){
	scope.location(function(res){
		scope.pagedata.item.address=res.address;
		scope.$evalAsync();
	});
}

scope.pagedata.send_smscode=function(mobile){
	if(!mobile){
		alert('请先填写手机号！');
	}
	if(scope.pagedata.sending){
		return false;
	}
	var params={'data':{'mobile':mobile},'op':'send_verifycode','action':'member.mobile','plugin':'core'};
	params.callback=function(res){
		if(res=='success'){
			//发送成功，开始倒计时 
			scope.pagedata.sending=true;
			scope.count_down(60,'getVerifyCode','秒后重新发送',function(){
				scope.pagedata.sending=false;
				$('#getVerifyCode').text('重新发送');
			});
		}else{
			scope.message('验证码发送失败！');
		}
	}
	scope.post_json(params);
}
scope.pagedata.call=function(){
	if(scope.pagedata.called){
		if(scope.pagedata.mid_mobile){
			window.location.href = 'tel://' + scope.pagedata.mid_mobile;
			return;
		}else{
			scope.message('请勿重复拨打！');
			return;
		}

	}
	scope.pagedata.called=true;
	var params={'data':scope.pagedata.item,'op':'notice'};
	params.callback=function(res){
		if(res.status=='success'){
			scope.pagedata.mid_mobile=res.mobile;
			window.location.href = 'tel://' + res.mobile;
		}else{
			scope.message('拨号失败，请联系管理员！');
		}
	}
	scope.post_json(params);
}
</script>